package com.piggy.auth.bo;

import com.piggy.common.core.constant.UserConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@ApiModel("用户密码登录")
@EqualsAndHashCode(callSuper = true)
@Data
public class OAuthReqPwd extends OAuthReq {

    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{user.username.length.valid}")
    private String userName;

    /**
     * 用户名
     */
    @ApiModelProperty("手机号")
    private String phone;

    /**
     * 用户名
     */
    @ApiModelProperty("email")
    private String email;

    /**
     * 用户密码
     */
    @ApiModelProperty("密码")
    @NotBlank(message = "{user.password.not.blank}")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}")
    private String password;

    /**
     * 部门信息
     */
    @ApiModelProperty("部门信息")
    private String dept;

}
